<?php
$SubscriptionReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'SubscriptionReport');
?>
<h2>N&uacute;mero de Assinaturas</h2>
<section id="SubscriptionReport">
    <table id="SubscriptionReport_Monthly" class="Report">
        <thead>
            <tr>
                <th colspan="5">Relat&oacute;rio de Inscri&ccedil;&atilde;o Mensal</th>
            </tr>
            <tr class="header">
                <td>M&ecirc;s</td>
                <td>Total</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($SubscriptionReport['MONTH'] as $Month => $Total): ?>
                <tr>
                    <td><?= $Month ?></td>
                    <td><?= $Total ?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="SubscriptionReport_Yearly" class="Report hide">
        <thead>
            <tr>
                <th colspan="5">Relat&oacute;rio de Inscri&ccedil;&atilde;o Anual</th>
            </tr>
            <tr class="header">
                <td>Ano</td>
                <td>Total</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($SubscriptionReport['YEAR'] as $ArYearReport): ?>
                <tr>
                    <td><?= $ArYearReport['Year'] ?></td>
                    <td><?= $ArYearReport['NumberOfSubscriptions'] ?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

        <table id="SubscriptionReport_Period" class="Report hide">
        <thead>
            <tr>
                <th colspan="5">Relat&oacute;rio de Inscri&ccedil;&atilde;o por per&iacute;odo</th>
            </tr>
        </thead>
        <tbody>
            <tr class="header">
                <td>Per&iacute;odo</td>
                <td>Total</td>
            </tr>
            <?php foreach ($SubscriptionReport['PERIOD'] as $Period => $Total): ?>
                <tr>
                    <td><?= $Period ?></td>
                    <td><?= $Total ?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
    <div class="pagination">
        <a href="#" rel="Monthly" class="selected borderRadios">Mensal</a>
        <a href="#" rel="Yearly" class="nonselected borderRadios">Anual</a>
        <a href="#" rel="Period" class="nonselected borderRadios">Peri&oacute;dico</a>
    </div>
</section>